<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>背景</title>
    <style>
        body{
            background-image: url(./图片/蜘蛛侠标.jpg);
            /* 不平铺 */
            background-repeat: no-repeat;
            /* 居中 */
            /* background-position: center center */
            /* 若图片上面有导航条需要写，则可以把图片向下移 */
            background-position: center -100px;
        }
        .box{
            width: 400px;
            height: 400px;
            background-color: pink;
            /* 背景图片 */
            background-image: url(./图片/sailuo.jpg);
            /* 背景平铺 */
            /* background-repeat: repeat;  默认平铺 */
            /* background-repeat: repeat-x;  横向平铺 */
            /* background-repeat: repeat-y;  垂直平铺 */
            /* 不平铺 */
            background-repeat: no-repeat;
            /* 背景位置 方位名词 left right top bottom center (无顺序)*/
            background-position: center center;
            /* background-repeat: 100px 100px;  背景位置px*/
            

        }
    </style>
</head>
<body>
    <div class="box"></div>
</body>
</html>